﻿using HiSport.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace HiSport.Core.Entity.Transaction
{
    /// <summary>
    /// 微信支付配置
    /// </summary>
    [SugarTable(null, "微信支付配置")]
    public class WeChatPaySetting : EntityTenant
    {

        /// <summary>
        /// 应用号
        /// </summary>
        /// <remarks>
        /// 公众号、移动应用、小程序AppId、企业微信CorpId。
        /// </remarks>
        [SugarColumn(ColumnDescription = "应用号", DefaultValue = "", IsNullable = false, Length = 128)]
        public string AppId { get; set; }

        /// <summary>
        /// 商户号
        /// </summary>
        /// <remarks>
        /// 商户号、服务商户号
        /// </remarks>
        [SugarColumn(ColumnDescription = "商户号", DefaultValue = "", IsNullable = false, Length = 128)]
        public string MchId { get; set; }

        /// <summary>
        /// 子商户号
        /// </summary>
        /// <remarks>
        /// 目前仅调用服务商API时使用，子商户的商户号。
        /// </remarks>
        [SugarColumn(ColumnDescription = "子商户号", DefaultValue = "", IsNullable = false, Length = 128)]
        public string SubMchId { get; set; }

        /// <summary>
        /// 商户API证书
        /// </summary>
        /// <remarks>
        /// 可为 证书文件路径、证书文件的Base64编码。
        /// </remarks>
        [SugarColumn(ColumnDescription = "商户API证书", ColumnDataType = "text", DefaultValue = "", IsNullable = false, Length = 128)]
        public string Certificate { get; set; }

        /// <summary>
        /// 商户API密钥
        /// </summary>
        [SugarColumn(ColumnDescription = "商户API密钥", DefaultValue = "", IsNullable = false, Length = 128)]
        public string APIKey { get; set; }

        /// <summary>
        /// 商户API密钥
        /// </summary>
        [SugarColumn(ColumnDescription = "商户API密钥3", DefaultValue = "", IsNullable = false, Length = 128)]
        public string APIv3Key { get; set; }

        /// <summary>
        /// ip
        /// </summary>
        [SugarColumn(ColumnDescription = "ip", DefaultValue = "", IsNullable = false, Length = 128)]
        public string MchIP { get; set; }
    }
}
